package com.chixing.day04;

public class AccountTest {
    public static void main(String[] args) {
        Account account1=new Account();
        account1.depoist(500);
        account1.withdraw(100);

       SavingAccount sa= new SavingAccount();    //从父类继承方法
       sa.depoist(100);
       sa.withdraw(50);
       sa.setAccNo(5164615616464114L);
       sa.setAccName("Smith");
       sa.setAccTelno(15245984646L);
       sa.setAccPassword(123456);
       sa.setAccEmail("1524@qq.com");
       sa.setAccBalance(52031.41);
       sa.setAccType(0);

        System.out.println(sa);

        SavingAccount sa1=new SavingAccount(0115415616464114L,"John",152463845L,456789,"4567@qq.com",2541.10,1);

        SavingAccount sa3=sa1;

        //判断 sa3 是不是 SavingAccount类型
        boolean result1=sa3 instanceof SavingAccount;  //看堆中  的对象值得类型
        System.out.println(result1);

//        父类 类型




       CreditAccount ca=new CreditAccount();         //从父类继承方法
        ca.depoist(100);
        ca.withdraw(50);

    }
}
